package org.yutian.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

// @ResponseBody
@Controller // 返回视图，其实是通过模板引擎填充模板文件返回的内容
@RequestMapping("front_view")
public class FrontViewController {

    @RequestMapping("index")
    public String index(Model model){
        model.addAttribute("name", "图灵");
        return "index";
    }

    @RequestMapping("welcome")
    public String welcome(){
        return "welcome";
    }
}
